package com.kpmg.questionnaire.model;

import javax.persistence.*;

/**
 * Created by xionghao on 2016/11/10.
 */
@Entity
@Table(name = "question", schema = "questionnaire", catalog = "")
public class QuestionEntity {
    private int id;
    private String content;
    private String chineseContent;
    private String type;
    private String choose1;
    private String choose2;
    private String choose3;
    private String choose4;
    private String choose5;
    private String survey;
    private Integer score;
    private String impact;
    private String note;


    @Id
    @Column(name = "id", nullable = false)
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "content", nullable = false, length = 255)
    public String getContent() {
        return content;
    }
    
    public void setContent(String content) {
        this.content = content;
    }
    
    @Basic
    @Column(name = "contentchinese", nullable = false, length = 255)
    public String getChineseContent() {
		return chineseContent;
	}

	public void setChineseContent(String chineseContent) {
		this.chineseContent = chineseContent;
	}

	@Basic
    @Column(name = "type", nullable = false, length = 100)
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Basic
    @Column(name = "choose1", nullable = true, length = 255)
    public String getChoose1() {
        return choose1;
    }

    public void setChoose1(String choose1) {
        this.choose1 = choose1;
    }

    @Basic
    @Column(name = "choose2", nullable = true, length = 255)
    public String getChoose2() {
        return choose2;
    }

    public void setChoose2(String choose2) {
        this.choose2 = choose2;
    }

    @Basic
    @Column(name = "choose3", nullable = true, length = 255)
    public String getChoose3() {
        return choose3;
    }

    public void setChoose3(String choose3) {
        this.choose3 = choose3;
    }

    @Basic
    @Column(name = "choose4", nullable = true, length = 255)
    public String getChoose4() {
        return choose4;
    }

    public void setChoose4(String choose4) {
        this.choose4 = choose4;
    }

    @Basic
    @Column(name = "choose5", nullable = true, length = 255)
    public String getChoose5() {
        return choose5;
    }

    public void setChoose5(String choose5) {
        this.choose5 = choose5;
    }

    @Basic
    @Column(name = "survey", nullable = true, length = 255)
    public String getSurvey() {
        return survey;
    }

    public void setSurvey(String survey) {
        this.survey = survey;
    }

    @Basic
    @Column(name = "score", nullable = true)
    public Integer getScore() {
        return score;
    }

    public void setScore(Integer score) {
        this.score = score;
    }

    @Basic
    @Column(name = "impact", nullable = true, length = 100)
    public String getImpact() {
        return impact;
    }

    public void setImpact(String impact) {
        this.impact = impact;
    }

    @Basic
    @Column(name = "note", nullable = true, length = 255)
    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        QuestionEntity that = (QuestionEntity) o;

        if (id != that.id) return false;
        if (content != null ? !content.equals(that.content) : that.content != null) return false;
        if (type != null ? !type.equals(that.type) : that.type != null) return false;
        if (choose1 != null ? !choose1.equals(that.choose1) : that.choose1 != null) return false;
        if (choose2 != null ? !choose2.equals(that.choose2) : that.choose2 != null) return false;
        if (choose3 != null ? !choose3.equals(that.choose3) : that.choose3 != null) return false;
        if (choose4 != null ? !choose4.equals(that.choose4) : that.choose4 != null) return false;
        if (choose5 != null ? !choose5.equals(that.choose5) : that.choose5 != null) return false;
        if (survey != null ? !survey.equals(that.survey) : that.survey != null) return false;
        if (score != null ? !score.equals(that.score) : that.score != null) return false;
        if (impact != null ? !impact.equals(that.impact) : that.impact != null) return false;
        if (note != null ? !note.equals(that.note) : that.note != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + (content != null ? content.hashCode() : 0);
        result = 31 * result + (type != null ? type.hashCode() : 0);
        result = 31 * result + (choose1 != null ? choose1.hashCode() : 0);
        result = 31 * result + (choose2 != null ? choose2.hashCode() : 0);
        result = 31 * result + (choose3 != null ? choose3.hashCode() : 0);
        result = 31 * result + (choose4 != null ? choose4.hashCode() : 0);
        result = 31 * result + (choose5 != null ? choose5.hashCode() : 0);
        result = 31 * result + (survey != null ? survey.hashCode() : 0);
        result = 31 * result + (score != null ? score.hashCode() : 0);
        result = 31 * result + (impact != null ? impact.hashCode() : 0);
        result = 31 * result + (note != null ? note.hashCode() : 0);
        return result;
    }
}
